package com.ruoyi.app.domain;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class User {
    private Long id;

    private Long parentId;

    private String nickName;

    private String name;

    private String avatarUrl;

    private String wxId;

    private String email;

    private String password;

    private String signature;

    private String phone;

    private String idNumber;

    private String invitationCode;

    private BigDecimal balance;

    private Boolean disable;

    private Date createTime;

    private Date updateTime;


    private User superior;

    private int rewardBalance;

    private int isMember;

    private String code;


    public void addReward(int amount)
    {
        this.rewardBalance += amount;
    }

    public User(String name, User superior)
    {
        this.name = name;
        this.superior = superior;
        this.rewardBalance = 0;
    }

    public User()
    {

    }
}